package com.example.gateway.designPattern.facade;

/**
 * @ClassName: Computer
 * @Description:
 * @Author: YourName
 * @Date: 2024/12/31
 */

public class Computer {
    private Cpu cpu;
    private Memory memory ;
    private Disk disk;

    public Computer(){
        cpu = new Cpu();
        memory = new Memory();
        disk = new Disk();
    }

    public void start(){
        System.out.println("Computer start begin");
        cpu.start();
        disk.start();
        memory.start();
        System.out.println("Computer start end");
    }
    public void shutdown(){
        System.out.println("Computer shutDown begin");
        cpu.shutDown();
        disk.shutDown();
        memory.shutDown();
        System.out.println("Computer shutDown end...");
    }
}
